package com.chujian.core.entity;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chujian.framework.core.IId;
import com.chujian.framework.core.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;


/**
 * 配置表
 *
 * @author yj
 * @since 2021-07-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("core_cfg")
@KeySequence("core_cfg_seq")
public class CoreCfg extends BaseEntity implements IId {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "配置id")
    @TableId("cfg_id")
    private Long cfgId;

    @ApiModelProperty(value = "配置名称")
    @TableField("cfg_name")
    private String cfgName;

    @ApiModelProperty(value = "配置值")
    @TableField("cfg_val")
    private String cfgVal;

    @ApiModelProperty(value = "排序")
    @TableField("order_no")
    private Integer orderNo;

    @ApiModelProperty(value = "key")
    @TableField("cfg_key")
    private String cfgKey;

    @ApiModelProperty(value = "产品id")
    @TableField("prod_id")
    private Long prodId;

    @ApiModelProperty(value = "账套id")
    @TableField("ac_id")
    private Long acId;

    @ApiModelProperty(value = "num1")
    @TableField("num1")
    private Long num1;

    @ApiModelProperty(value = "num2")
    @TableField("num2")
    private Long num2;

    @ApiModelProperty(value = "num3")
    @TableField("num3")
    private Long num3;

    @ApiModelProperty(value = "num4")
    @TableField("num4")
    private Long num4;

    @ApiModelProperty(value = "num5")
    @TableField("num5")
    private Long num5;

    @ApiModelProperty(value = "str1")
    @TableField("str1")
    private String str1;

    @ApiModelProperty(value = "str2")
    @TableField("str2")
    private String str2;

    @ApiModelProperty(value = "str3")
    @TableField("str3")
    private String str3;

    @ApiModelProperty(value = "str4")
    @TableField("str4")
    private String str4;

    @ApiModelProperty(value = "str5")
    @TableField("str5")
    private String str5;


    // ++++++ 系统拓展 +++++++
    @TableField(exist = false)
    private Map<String, String> query = new HashMap<>();

    @Override
    public Long getId() {
        return this.cfgId;
    }

    @Override
    public void setId(Serializable id) {
        if (null != id) {
            this.cfgId = Long.parseLong("" + id);
        }
    }

    // ++++++ 业务拓展 +++++++
}
